#include <iostream>

template <typename T>
void Mysort(T arr[], int len)
{
    for (int i = 0; i < len; i++)
    {
        for (int j = 0; j < len - i - 1; j++)
        {
            if (arr[j] > arr[j + 1])
            {
                T temp = arr[j];
                arr[j] = arr[j + 1];
                arr[j + 1] = temp;
            }
        }
    }
}

int main()
{
    int arr[5] = {2, 4, 1, 3, 5};
    Mysort(arr, 5);

    char arr2[] = {'b', 'a', 'd', 'c', 'e'};
    Mysort(arr2, 5);
    for (int i = 0; i < 5; i++)
    {
        std::cout << arr2[i] << std::endl;
    }
    return 0;
}